cairo_libs = []
if cc.get_id() == 'msvc'
- # Fallback depedency discovery for those on Visual Studio that do not generate
+ # Fallback dependency discovery for those on Visual Studio that do not generate
# pkg-config files in their build systems for MSVC
# Fallback for Cairo
if not cairo_dep.found()
profiler_enabled = get_option('profiler')
if profiler_enabled
- # Depend on libsysprof-capture if we only need the capture format.
- # For -Dbuild-tests=true, we need SysprofProfiler to profile processes
- # which requires sysprof-4 instead of sysprof-capture-4.
-
- profiler_options = [
- 'enable_examples=false',
- 'enable_gtk=false',
- 'enable_tests=false',
- 'enable_tools=false',
- 'with_sysprofd=none',
- 'help=false',
- ]
-
- if get_option('build-tests')
- profiler_dep_name = 'sysprof-4'
- profiler_fallback = 'libsysprof_dep'
- else
- profiler_dep_name = 'sysprof-capture-4'
- profiler_fallback = 'libsysprof_capture_dep'
- profiler_options += ['libsysprof=false']
- endif
-
- profiler_dep = dependency(profiler_dep_name,
+ # libsysprof-capture support
+ libsysprof_capture_dep = dependency('sysprof-capture-4',
required: true,
- default_options: profiler_options,
- fallback: ['sysprof', profiler_fallback],
+ default_options: [
+ 'enable_examples=false',
+ 'enable_gtk=false',
+ 'enable_tests=false',
+ 'enable_tools=false',
+ 'libsysprof=true',
+ 'with_sysprofd=none',
+ 'help=false',
+ ],
+ fallback: ['sysprof', 'libsysprof_capture_dep'],
)
-
- if profiler_dep.found()
- cdata.set('HAVE_SYSPROF', profiler_dep.found())
+ if libsysprof_capture_dep.found()
+ cdata.set('HAVE_SYSPROF', 1)
else
error('Profiler support not found, but was explicitly requested.')
endif
+ libsysprof_dep = dependency('sysprof-4',
+ required: false,
+ default_options: [
+ 'enable_examples=false',
+ 'enable_gtk=false',
+ 'enable_tests=false',
+ 'enable_tools=false',
+ 'libsysprof=true',
+ 'with_sysprofd=none',
+ 'help=false',
+ ],
+ fallback: ['sysprof', 'libsysprof_dep'],
+ )
endif
graphene_dep_type = graphene_dep.type_name()
dependencies: [libgtk_dep, libm])
endforeach
-if get_option('profiler')
+if profiler_enabled
executable('testperf', 'testperf.c',
- dependencies: [profiler_dep, platform_gio_dep, libm])
+ dependencies: [libsysprof_dep, platform_gio_dep, libm])
endif
librsvg = dependency('librsvg-2.0', version: '>= 2.46.0', required: false)
-if get_option ('profiler')
- test_performance = executable('test-performance', 'test-performance.c',
- c_args: common_cflags,
- dependencies: [profiler_dep, platform_gio_dep, libm])
+if profiler_enabled
+ if libsysprof_dep.found()
+ test_performance = executable('test-performance', 'test-performance.c',
+ c_args: common_cflags,
+ dependencies: [libsysprof_dep, platform_gio_dep, libm])
+ endif
endif